falloutfandomcom_de-20200216-history
Modul:Games
local p = {} local games = { "AR" = "All Roads", "D20" = "Fallout Pen & Paper d20", "FB" = "Fallout Bible", "FBG" = "Fallout: Das Brettspiel", "FBGNC" = "Fallout: Neu-Kalifornien", "FILM" = "Fallout (Film)", "FNV" = "Fallout: New Vegas", "FNVGRA" = "Gun Runners' Arsenal", "FNVDM" = "Dead Money", "FNVHH" = "Honest Hearts", "FNVOWB" = "Old World Blues (Add-On)", "FNVLR" = "Lonesome Road (Add-On)", "FO1" = "Fallout", "FO2" = "Fallout 2", "FO3" = "Fallout 3", "FO3OA" = "Operation: Anchorage (Add-On)", "FO3TP" = "The Pitt (Add-On)", "FO3BS" = "Broken Steel", "FO3PL" = "Point Lookout (Add-On)", "FO3MZ" = "Mothership Zeta (Add-On)", "FO4" = "Fallout 4", "FO4AUT" = "Automatron (Add-On)", "FO4WW" = "Wasteland Workshop", "FO4FH" = "Far Harbor (Add-On)", "FO4CW" = "Contraptions Workshop", "FO4VW" = "Vault-Tec Workshop", "FO4NW" = "Nuka-World (Add-On)", "FO4VR" = "Fallout 4 VR", "FO4CC" = "Creation Club", "FO76" = "Fallout 76", "FO76WA" = "Wild Appalachia", "FO76NW" = "Nuclear Winter", "FO76WL" = "Wastelanders", "FOBOS" = "Fallout: Brotherhood of Steel", "FOBOS2" = "Fallout: Brotherhood of Steel 2", "FOS" = "Fallout Shelter", "FOT" = "Fallout Tactics", "FOT2" = "Fallout Tactics 2", "FOW" = "Fallout: Warfare", "FOX" = "Fallout Extreme", "FWW" = "Fallout: Wasteland Warfare", "JES" = "J.E. Sawyer's Fallout RPG", "LH" = "Lionheart", "PA" = "One Man, and a Crate of Puppets", "PV13" = "Project V13", "TAR" = "Project V13", "TORN" = "TORN", "VB" = "Van Buren", } -- look up short title without disambig function stitle(game) local result = gamesgame if game ~= "FILM" then result = result:gsub('%s%(.*', ) end return result end -- -- This function, links, is for ordinary links within the body of -- an infobox. So if all you want returned is Fallout 4, then -- use the syntax: -- }}} -- specifying a second argument returns the text in italics: -- }|1}} -- function p.links(frame) local result = '' local game_list = mw.text.split(frame.args1, "%s*,%s*") for n, game in ipairs(game_list) do if game:lower() "none" then result = '' else result = result .. '[.. games[game .. '|' .. stitle(game) .. ']]' if n ~= #game_list then result = result .. ' ' end end end if (frame.args2 and result ~= '') then return "" .. result .. "''" else return result end end -- -- This function, title, generically generates links for the supertitle. -- Either just to the game page itself or to a more specific page. -- -- gives just Fallout 4 -- results in Fallout 4 -- results in Fallout 4 weapon -- function p.title(frame) local result = '' local game_list = mw.text.split(frame.args1, "%s*,%s*") for n, game in ipairs(game_list) do if game:lower() "none" then result = 'Nur erwähnt' if frame.args3 then result = result .. ' ' .. frame.args3 end else local link if frame.args2 then link = stitle(game) .. ' ' .. frame.args2 else link = gamesgame end local text = stitle(game) if frame.args3 and n #game_list then text = text .. ' ' .. frame.args3 end result = result .. '' .. text .. '' if n ~= #game_list then result = result .. ' / ' end end end return result end return p --